//
//  GWRecomendCategaryCell.m
//  百思不得姐
//
//  Created by qianfeng on 16/3/2.
//  Copyright © 2016年 高炜. All rights reserved.
//

#import "GWRecomendCategaryCell.h"
#import "GWRecomendCategary.h"

@interface GWRecomendCategaryCell ()
@property (weak, nonatomic) IBOutlet UIView *identifierView;

@end
@implementation GWRecomendCategaryCell

- (void)awakeFromNib {
    self.backgroundColor =myColor(244, 244, 244);
    self.identifierView.backgroundColor =myColor(219, 21, 26);
}

-(void)setCategary:(GWRecomendCategary *)categary
{
    _categary =categary;
    self.textLabel.text =categary.name;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.textLabel.y =2;
    self.textLabel.height =self.textLabel.height-self.textLabel.y*2;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    self.identifierView.hidden =!selected;
    self.textLabel.textColor =selected ?myColor(219, 21, 26):myColor(78, 78, 78);
    self.backgroundColor =selected ?[UIColor whiteColor]:myColor(244, 244, 244);
}

@end
